package com.dengyuanke.admin.controller;

import com.dengyuanke.common.result.JsonResult;
import com.dengyuanke.entity.Admin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * Created by dengyuanke on 2017/11/9.
 */
@Api(tags = "管理员相关API")
@RestController
public class AdminController {
    /**
     * 获取管理员信息
     * @return
     */
    @ApiOperation(value ="获取管理员信息" )
    @PostMapping("/getadmininfo")
    public JsonResult getAdminInfo(@ApiIgnore @RequestAttribute Admin currentUser){
        return JsonResult.renderSuccess(currentUser);
    }

}
